﻿<%@ Page Title="" Language="C#" MasterPageFile="~/XB/MasterPage/MasterPage.master" AutoEventWireup="true" EnableEventValidation ="false" CodeFile="Register.aspx.cs" Inherits="BM_Register" %>
<%@ Import Namespace="Expo.Training.BRule" %>
<%@ Register TagPrefix="ta" Src="~/Controls/QuestionAttributeSelecor.ascx" TagName="CAS"  %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
 <link href="../Css/Classic_cs/Common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%= Base.Source %>/js/Common/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="<%= Base.Source %>/js/Common/jquery.hoverIntent.js"></script>
<script type="text/javascript" src="<%= Base.Source %>/Controls/JsCalendar/JSCalendar.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="dv_Result" runat="server">
    <div class="bd_in w984 clearfix">
        <div class="SignUp">
            <div class="secondNav clearfix">
                <div class="navT l">
                    <div class="navT_in">
                        <div class="navTM">
                            <span>用户注册</span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="clearfix mt10">
                <div class="SignUpM border_gray l">
                    <div class="title">
                        <span>注册</span><span class="lightgray">（填写您的个人信息）</span>
                    </div>
                    <table>
                        <tbody>
                            <tr>
                                <th width="10%">
                                    用户名：
                                </th>
                                <td style="width: 500px; color: Red;">
                                    <input type="text" class="signUp_txt" runat="server" id="txt_useraccount" name="txt_useraccount" />&nbsp;<font color="red">*</font>    	        
    	                            <span id="sp_UserAccount" style="display:none;" runat="server" class="note2">&nbsp;用户名不能为空</span>
    	                            <span id="sp_UserAccount2" style="display:none;"  runat="server" class="note2">&nbsp;用户名已存在</span>
                                </td>
                            </tr>
                            <tr>
                                <th width="10%">
                                    学习卡号：
                                </th>
                                <td style="width: 500px; color: Red;">
                                    <input type="text" class="signUp_txt" runat="server" id="txt_CardID" name="txt_email" />&nbsp;    	        
    	                            <span id="spCardID" style="display:none;"  runat="server" class="note2">&nbsp;学习卡已存在</span>
                                </td>
                            </tr>
                            <tr>
                                <th width="10%">
                                    密码：
                                </th>
                                <td style="width: 500px; color: Red;">
                                    <input type="password" class="signUp_txt" runat="server" id="txt_pwd" name="txt_pwd" /><font color="red">*</font>   
                                    <span id="sp_Password5" style="display:none;"  runat="server" class="note2">&nbsp;密码不能为空</span> 	        
    	                            <span id="sp_Password4" style="display:none;"  runat="server" class="note2">&nbsp;密码必须至少8位字符</span>
    	                            <span id="sp_Password2" style="display:none;"  runat="server" class="note2">&nbsp;两次密码输入不一致</span>
                                </td>
                            </tr>
                            <tr>
                                <th width="10%">
                                    确认密码：
                                </th>
                                <td style="width: 500px; color: Red;">
                                    <input type="password" class="signUp_txt" runat="server" id="txt_repwd" name="txt_repwd" /><font color="red">*</font>
                                    <span id="sp_Password3" style="display:none;"  runat="server" class="note2">&nbsp;确认密码不能为空</span>
                                </td>
                            </tr>
                            <tr style="display:none">
                                <th width="10%">
                                    志愿者：
                                </th>
                                <td>
                                    <asp:CheckBox ID="chkIsVolunteer" Text="是否志愿者" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <th width="10%">
                                    真实姓名：
                                </th>
                                <td style="width: 500px; color: Red;">
                                    <input type="text" class="signUp_txt" runat="server" id="txt_realname" name="txt_realname" />&nbsp;<font color="red">*</font>
    	                            <span id="sp_Realname" style="display:none;"  runat="server" class="note2">&nbsp;真实姓名不能为空</span>
                                </td>
                            </tr>
                            <tr>
                                <th width="10%">
                                    昵称：
                                </th>
                                <td style="width: 500px; color: Red;">
                                    <input type="text" class="signUp_txt" runat="server" id="txt_NickName" name="txt_realname" />&nbsp;<font color="red">*</font>
    	                            <span id="sp_NickName" style="display:none;"  runat="server" class="note2">&nbsp;昵称不能为空</span>
    	                            <span id="sp_NickName2" style="display:none;"  runat="server" class="note2">&nbsp;昵称已存在</span>
                                </td>
                            </tr>
                            <tr>
                                <th width="10%">
                                    证件类型：
                                </th>
                                <td style="width: 500px; color: Red;">
                                    <asp:DropDownList ID="ddl_CardType" runat="server" Width="150px">
                                        <asp:ListItem Text="身份证" Value="1" Selected="True">身份证</asp:ListItem>
                                        <asp:ListItem Text="机构代码" Value="2">机构代码</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <th width="10%">
                                    证件号码：
                                </th>
                                <td style="width: 500px; color: Red;">
                                    <input type="text" class="signUp_txt" runat="server" id="txt_IDCard" name="txt_IDCard" />&nbsp;<font color="red">*</font>
                                    <span id="sp_IDCard" style="display:none;"  runat="server" class="note2">&nbsp;证件号码不能为空</span>
                                </td>
                            </tr>
                            <tr>
                                <th width="10%">
                                    性别：
                                </th>
                                <td>
                                    <input type="radio" id="rbtn_male" name="gender" style="vertical-align: middle;" runat="server" value="0" checked="true" /><label for="rbtn_male" style="vertical-align: middle;">男</label>
                                    <input type="radio" id="rbtn_female" name="gender" style="vertical-align: middle;" runat="server" value="1" /><label for="rbtn_female" style="vertical-align: middle;">女</label>
                                </td>
                            </tr>
                            <tr>
                                <th width="10%">
                                    联系电话：
                                </th>
                                <td style="width: 500px; color: Red;">
                                    <input type="text" class="signUp_txt" runat="server" id="txt_cellphone" name="txt_cellphone" />
                                </td>
                            </tr>
                            <tr>
                                <th width="10%">
                                    职务：
                                </th>
                                <td style="width: 500px; color: Red;">
                                    <input type="text" class="signUp_txt" runat="server" id="txt_Duty" name="txt_Duty" />
                                </td>
                            </tr>
                            <tr>
                                <th width="10%">
                                    工作地区：
                                </th>
                                <td style="width: 500px; color: Red;">
                                    <asp:DropDownList ID="ddl_WordAddress_Province" runat="server" Width="150px"></asp:DropDownList>
                                    <asp:DropDownList ID="ddl_WordAddress_City" runat="server" Width="150px"></asp:DropDownList>
                                    <asp:HiddenField runat="server" ID="hd_WordAddress_City" Value="0" />
                                    <asp:DropDownList ID="ddl_WordAddress_Area" runat="server" Width="150px"></asp:DropDownList>
                                    <asp:HiddenField runat="server" ID="hd_WordAddress_Area" Value="0" />
                                </td>
                            </tr>
                            <tr>
                                <th width="10%">
                                    生活地区：
                                </th>
                                <td style="width: 500px; color: Red;">
                                    <asp:DropDownList ID="ddl_HomeAddress_Province" runat="server" Width="150px"></asp:DropDownList>
                                    <asp:DropDownList ID="ddl_HomeAddress_City" runat="server" Width="150px"></asp:DropDownList>
                                    <asp:HiddenField runat="server" ID="hd_HomeAddress_City" Value="0" />
                                    <asp:DropDownList ID="ddl_HomeAddress_Area" runat="server" Width="150px"></asp:DropDownList>
                                    <asp:HiddenField runat="server" ID="hd_HomeAddress_Area" Value="0" />
                                </td>
                            </tr>
                            <tr>
                                <th width="10%">
                                    电子邮箱：
                                </th>
                                <td style="width: 500px; color: Red;">
                                    <input type="text" class="signUp_txt" runat="server" id="txt_email" name="txt_email" />&nbsp;<font color="red">*</font>
    	                            <span id="sp_Email2" style="display:none;" runat="server" class="note2">&nbsp;E-Mail地址不合法</span>
    	                            <span id="sp_Email3" style="display:none;"  runat="server" class="note2">&nbsp;E-Mail地址已存在</span>
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    用户标签：
                                </th>
                                <td>
                                    <ta:CAS runat="server" ID="ta_Attributes" Width="500" Type="2" />
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    验证码：
                                </th>
                                <td>
                                    <asp:TextBox ID="CheckCode" CssClass="input" runat="server" Width="60px" MaxLength="20" AutoCompleteType="Disabled"></asp:TextBox>
                            &nbsp;<img src="../XB/CheckCode.aspx" id="checkcode_img" name="checkcode" alt="请输入验证码!" />
                            <a title="刷新验证码" href="#" onclick="javascript:document.getElementById('checkcode_img').src='CheckCode.aspx?id='+Math.random();return false;">看不清，换张图片？</a>
                                </td>
                            </tr>
                            <tr>
                                <th width="20%">
                                </th>
                                <td width="80%">
                                    <input type="button" name="btn_Add" class="btn" value=" 提 交 " onclick="javascript:check();" />
                                    <asp:LinkButton ID="but_Add" runat="server" CssClass="btn" OnClick="but_Add_Click" Style="display: none" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="r signUp_guide  mt15">
                    <div>
                        <strong>我要注册的是什么？</strong>
                        <p>
                        </p>
                    </div>
                    <div class="mt20">
                        <strong>平台使用有什么要求？</strong>
                        <p>
                            请你使用IE6.0以上的浏览器版本，并允许浏览器安装Flash插件，以及下载网站提供的实用工具，这些对您流畅快速的学习有帮助。</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>
    <div id="dv_NoResult" runat="server">
        <div class="bd_in w984 clearfix">
            <div class="SignUp">
                <div class="secondNav clearfix">
                    <div class="navT l">
                        <div class="navT_in">
                            <div class="navTM">
                                <span>当前平台不允许注册</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
<script type="text/javascript">
    jQuery(function() {
     
        jQuery("#<%= ddl_WordAddress_Province.ClientID %>").change(function() {
            var areaKey = jQuery(this).val();
            // 首先初始化
            jQuery("#<%= ddl_WordAddress_City.ClientID %>").empty().append(jQuery("<option></option>").val("0").html("  ---  请选择  ---  "));
            if (areaKey != 0) {
                sendData(2, areaKey, 1);
            }
        });
        jQuery("#<%= ddl_WordAddress_City.ClientID %>").change(function() {
            var areaKey = jQuery(this).val();
            // 首先初始化
            jQuery("#<%= ddl_WordAddress_Area.ClientID %>").empty().append(jQuery("<option></option>").val("0").html("  ---  请选择  ---  "));
            jQuery("#<%= hd_WordAddress_City.ClientID %>").val(areaKey);
            if (areaKey != 0) {
                sendData(3, areaKey, 2);
            }
        });
        jQuery("#<%= ddl_WordAddress_Area.ClientID %>").change(function() {
            jQuery("#<%= hd_WordAddress_Area.ClientID %>").val(jQuery(this).val());
        });

        jQuery("#<%= ddl_HomeAddress_Province.ClientID %>").change(function() {
            var areaKey = jQuery(this).val();
            // 首先初始化
            jQuery("#<%= ddl_HomeAddress_City.ClientID %>").empty().append(jQuery("<option></option>").val("0").html("  ---  请选择  ---  "));
            if (areaKey != 0) {
                sendData(2, areaKey, 3);
            }
        });
        jQuery("#<%= ddl_HomeAddress_City.ClientID %>").change(function() {
            var areaKey = jQuery(this).val();
            // 首先初始化
            jQuery("#<%= ddl_HomeAddress_Area.ClientID %>").empty().append(jQuery("<option></option>").val("0").html("  ---  请选择  ---  "));
            jQuery("#<%= hd_HomeAddress_City.ClientID %>").val(areaKey);
            if (areaKey != 0) {
                sendData(3, areaKey, 4);
            }
        });

        jQuery("#<%= ddl_HomeAddress_Area.ClientID %>").change(function() {
            jQuery("#<%= hd_HomeAddress_Area.ClientID %>").val(jQuery(this).val());
        });
        
    });
    function sendData(nodeType, areaKey, press) {
        var cmd = 'getcitylist';
        jQuery.ajax({
            type: "POST",
            url: "../api/Member.ashx",
            data: 'type=' + cmd + '&nodeType=' + nodeType + '&areaKey=' + areaKey,
            dataType: "json",
            success: function(data) {
                date = data;
                getddlList(data, press);
            },
            error: function() {
                alert("ajax请求发生错误");
            }

        });
    }
    function getddlList(data, press) {
        jQuery.each(data, function(i, item) {
            if (press == 1) {
                jQuery("#<%= ddl_WordAddress_City.ClientID %>").append(jQuery("<option></option").val(item.AreaId).html(item.AreaName));
            }
            else if (press == 2) {
                jQuery("#<%= ddl_WordAddress_Area.ClientID %>").append(jQuery("<option></option").val(item.AreaId).html(item.AreaName));
            }
            else if (press == 3) {
                jQuery("#<%= ddl_HomeAddress_City.ClientID %>").append(jQuery("<option></option").val(item.AreaId).html(item.AreaName));
            }
            else if (press == 4) {
                jQuery("#<%= ddl_HomeAddress_Area.ClientID %>").append(jQuery("<option></option").val(item.AreaId).html(item.AreaName));
            }
        });
    }
    function check() {
        __doPostBack('ctl00$ContentPlaceHolder1$but_Add', '');
    }
</script>
</asp:Content>
